package com.ai.chat.domain;

/**
 * ClassName:    ChatMessage
 * Description:  TODO
 * Author:       yuzx
 * Date:         2025/9/8 14:24
 * Version:      1.0
 **/
import com.alibaba.dashscope.common.Role;
import lombok.Data;

/**
 * 聊天消息实体类
 *
 * @author ruoyi
 */
@Data
public class ChatMessage {
    /** 角色：user/assistant/system */
    private String role;

    /** 消息内容 */
    private String content;

    public ChatMessage() {
    }

    public ChatMessage(String role, String content) {
        this.role = role;
        this.content = content;
    }

    public ChatMessage(Role role, String content) {
        this.role = role.getValue();
        this.content = content;
    }
}

